<%--
  Created by IntelliJ IDEA.
  User: 19668
  Date: 2019/10/23
  Time: 15:16
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="/js/jquery-3.4.1.min.js"></script>
    <script>
        $(function () {
           var aaa = $('#ttt').val();
           if(aaa==1){
               $('#cc').val("已点赞");
           }else{
               $('#cc').val("点赞");
           }
        })
    </script>
</head>
<body>
<c:forEach items="${sessionScope.allComment}" var="e">
<div>
<samp>${e.beclick}</samp>
</div>
</c:forEach>
<form action="/comment/update.do" method="post">
    <input type="text" value="${sessionScope.shu}" id="ttt" hidden="hidden">
    数量:<input type="text" id="beclick" name="beclick" value=""/>
    id:<input type="text" id="id" name="id" value=""/>
    <input type="submit" id="cc" value="点赞"/>
</form>
</body>
</html>
